Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prisma for db #4034

Merged
merged 12 commits into from
Nov 19, 2023
Merged

feat: prisma for db #4034

merged 12 commits into from
Nov 19, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Nov 19, 2023

What does this PR do?

🤖[deprecated] Generated by Copilot at 2e8950c

This pull request introduces Prisma as a framework for working with the PostgreSQL database in the apps/api project. It adds the necessary files and dependencies to use Prisma for defining, migrating, and querying the database schema from TypeScript and Node.js. It also exports a Prisma client instance that can be used throughout the API server code.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖[deprecated] Generated by Copilot at 2e8950c

  • Add Prisma framework for working with PostgreSQL database in TypeScript and Node.js (link, link, link, link, link, link, link, link, link, link, link, link)
  • Define data model and relations in apps/api/db/schema.prisma using Prisma schema language (link)
  • Generate SQL migration file in apps/api/db/migrations/20231119144606_/migration.sql from Prisma schema file using Prisma CLI (link)
  • Generate Prisma client library in @prisma/client/edge folder from Prisma schema file using Prisma CLI (link, link, link, link)
  • Export singleton instance of Prisma client in apps/api/utils/prisma.ts module for querying the database from API server code (link)
  • Add DATABASE_URL environment variable in apps/api/.env.example file for configuring database connection (link)
  • Add prisma development dependency in apps/api/package.json file for running Prisma CLI commands (link, link, link)
  • Add Prisma CLI scripts in apps/api/package.json file for generating client, applying migrations, launching studio, and formatting schema (link)
  • Add migration lock file in apps/api/db/migrations/migration_lock.toml file for tracking database migration state (link)
  • Add Prisma engines version and package in pnpm-lock.yaml file for specifying Prisma query, migration, and introspection engines (link, link)

Emoji

🗄️🛠️🚀

Copy link

height bot commented Nov 19, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

vercel bot commented Nov 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
api ✅ Ready (Inspect) Visit Preview Nov 19, 2023 3:59pm
prerender ✅ Ready (Inspect) Visit Preview Nov 19, 2023 3:59pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
web ⬜️ Ignored (Inspect) Visit Preview Nov 19, 2023 3:59pm

@vercel vercel bot temporarily deployed to Preview – prerender November 19, 2023 14:48 Inactive
@vercel vercel bot temporarily deployed to Preview – api November 19, 2023 14:48 Inactive
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
prisma 5.6.0 eval, network, filesystem, shell, environment +0 15.9 MB prismabot

@vercel vercel bot temporarily deployed to Preview – web November 19, 2023 14:51 Inactive
@vercel vercel bot temporarily deployed to Preview – api November 19, 2023 15:39 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender November 19, 2023 15:39 Inactive
@vercel vercel bot temporarily deployed to Preview – web November 19, 2023 15:43 Inactive
@vercel vercel bot temporarily deployed to Preview – api November 19, 2023 15:49 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender November 19, 2023 15:50 Inactive
@vercel vercel bot temporarily deployed to Preview – api November 19, 2023 15:56 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender November 19, 2023 15:56 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender November 19, 2023 15:58 Inactive
@vercel vercel bot temporarily deployed to Preview – api November 19, 2023 15:59 Inactive
@bigint bigint merged commit 48df9c6 into main Nov 19, 2023
3 of 4 checks passed
@bigint bigint deleted the drizzle branch November 19, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant